<template>
  <div class="customerUpdateThree">
    <el-button type="primary" @click="newUser">新增联系人</el-button>
    <el-table v-loading="loading" :data="customerList">
      <el-table-column label="签订人" align="center" prop="id"/>
      <el-table-column label="联系电话" align="center" prop="companyName"/>
      <el-table-column label="备注" align="center" prop="companyType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.company_type" :value="scope.row.companyType"/>
        </template>
      </el-table-column>
      <el-table-column label="账号" align="center" prop="companystatus">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.company_status" :value="scope.row.companystatus"/>
        </template>
      </el-table-column>

      <el-table-column label="密码" align="center" prop="industryname"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['houseinfo:houseinfo:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['houseinfo:houseinfo:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!-- 添加或修改房间对话框 -->
    <el-dialog title="新增联系人" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">

        <el-form-item label="签订人" prop="roomnumber">
          <el-input v-model="form.roomnumber" placeholder="请输入签订人"/>
        </el-form-item>

        <el-form-item label="联系电话" prop="area">
          <el-input v-model="form.area" placeholder="请输入联系电话"/>
        </el-form-item>
        <el-form-item label="备注" prop="publicArea">
          <el-input type="textarea" rows="5" v-model="form.publicArea" placeholder="备注"/>
        </el-form-item>
        <el-form-item label="账号" prop="rentarea">
          <el-input v-model="form.rentarea" placeholder="请输入账号"/>
        </el-form-item>
        <el-form-item label="密码" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入密码"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<style lang="scss">
  .customerUpdateThree{
    .el-button{
      margin:10px 0 !important;
    }
  }
</style>
<script>
  export default {
    data() {
      return {
        loading:false,
        customerList:[],
        open:false,
        form:{},
        rules:{}
      };
    },
    created() {
    },
    methods: {
      newUser(){
        this.open=true;
      },
      submitForm(){
        this.open=false;
      },
      cancel(){
        this.open=false;
      },
      handleUpdate(row){

      },
      handleDelete(row){

      }
    }
  };
</script>
